package Panels;

import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.DefaultCellEditor;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.TableColumn;
import javax.swing.table.TableRowSorter;

import componentes.panelconfondo;
import componentes.tablemodel;

@SuppressWarnings("serial")
public class PanelListar extends panelconfondo implements ActionListener{

	JScrollPane scrollPane;
	GridBagConstraints gbc;
	
	
	JTable table;
	
	
	public PanelListar(){
		super.setimagen("/recursos/cine1.jpg");
		
		
		
		this.dibujar();
		
		
	}
	
	
	public void dibujar(){
		
		this.setLayout(new GridBagLayout());
		
		tablemodel tabmodel = new tablemodel();
		
		table = new JTable(tabmodel);
	
        table.setFillsViewportHeight(true);
        
		scrollPane = new JScrollPane(table);
		
		TableRowSorter<tablemodel> elQueOrdena = new TableRowSorter<tablemodel>(tabmodel);
		table.setRowSorter(elQueOrdena);
		
		
		gbc = new GridBagConstraints(0, 0, 1, 1, 0, 0,
				GridBagConstraints.FIRST_LINE_START, GridBagConstraints.BOTH, new Insets(
						5, 5, 5, 5), 0, 0);
		this.add(scrollPane, gbc);
		
		
		
	}
	
	
	
	
	
	
	
	@Override
	public void actionPerformed(ActionEvent arg0) {
		// TODO Auto-generated method stub
		
	}

}
